package com.tarena.elts.ui;

import com.tarena.elts.entity.EntityContext;
import com.tarena.elts.service.ExamServiceImp;
import com.tarena.elts.util.Config;

public class Main {
	public static void main(String[] args){
		LoginFrame loginFrame = new LoginFrame();
		MenuFrame menuFrame =new MenuFrame();
		ExamFrame examFrame=new ExamFrame();
		WelcomeWindows welcomeWindows = new WelcomeWindows();
		ClientContext clientContext=new ClientContext();
		clientContext.setWelcomeWindows(welcomeWindows);
		ExamServiceImp examService = new ExamServiceImp();
		Config config = new Config("client.properties");
		EntityContext entityContext = new EntityContext(config);
		clientContext.setExamFrame(examFrame);
		examFrame.setClientContext(clientContext);
		examService.setEntityContext(entityContext);
		loginFrame.setClientContext(clientContext);
		menuFrame.setClientContext(clientContext);
		clientContext.setExamService(examService);
		clientContext.setLoginFrame(loginFrame);
		clientContext.setMenuFrame(menuFrame);
		clientContext.showUI();
	}
}
